﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using CqusInfo.RAL.User;
using CqusInfo.BLL.User;
namespace CqusInfo.Web.Controllers
{
    public class LoginController : Controller
    {
        //
        // GET: /Login/

        public ActionResult Index()
        {
            return View();
        }
        [HttpPost]
        public ActionResult Login(string userName, string password)
        {
            //UserModel model = new UserModel(
            //    CqusInfo.CR.Tool.EncodeByBase64.Encode("admin"),
            //    CqusInfo.CR.Tool.EncodeByBase64.Encode("123456"),
            //    CqusInfo.CR.Tool.EncodeByBase64.Encode("363519915@qq.com"),
            //    true, false, "宏文", false, DateTime.Now, false);
            //Int32 result = 0;
            //UserBLL user = new UserBLL();
            //result = user.Add(model);

            //List<UserModel> userList = user.Query(1, 2);

            //result = user.Delete(CqusInfo.CR.Tool.EncodeByBase64.Encode("admin"), true, false);

            //result = user.Update_Password(CqusInfo.CR.Tool.EncodeByBase64.Encode("admin"), "123456");

            return RedirectToAction("Index", "User", null);
        }
        public ActionResult Regist(UserModel model)
        {
            return View();
        }
    }
}
